
#!/bin/bash
# install.sh

if [ $UID != 0 ]
then
	echo must be run as root.
	exit 1
fi

USER=$(cat /etc/passwd | grep home | grep sh | cut -d: -f1)
DESKTOP="/home/${USER}/Desktop/"
INSTALL_DIR='/usr/local/share/rauth/'
EXEC_DIR='/usr/local/bin/'
NAME='rauth'

echo Uninstalling rauth...

echo rm ${EXEC_DIR}${NAME}
rm  ${EXEC_DIR}${NAME}
echo rm ${DESKTOP}Rauth.desktop
rm ${DESKTOP}Rauth.desktop

rm ${INSTALL_DIR} -r

echo rauth has been removed.
